<!doctype html>


<html>
<head>
  <link rel="shortcut icon" href="static/images/favicon.ico" type="image/x-icon">
  <title>MockClassRecord (Closure Library API Documentation - JavaScript)</title>
  <link rel="stylesheet" href="static/css/base.css">
  <link rel="stylesheet" href="static/css/doc.css">
  <link rel="stylesheet" href="static/css/sidetree.css">
  <link rel="stylesheet" href="static/css/prettify.css">

  <script>
     var _staticFilePath = "static/";
  </script>

  <script src="static/js/doc.js">
  </script>

  <meta charset="utf8">
</head>

<body onload="prettyPrint()">

<div id="header">
  <div class="g-section g-tpl-50-50 g-split">
    <div class="g-unit g-first">
      <a id="logo" href="index.html">Closure Library API Documentation</a>
    </div>

    <div class="g-unit">
      <div class="g-c">
        <strong>Go to class or file:</strong>
        <input type="text" id="ac">
      </div>
    </div>
  </div>
</div>





<div class="colmask rightmenu">
<div class="colleft">
    <div class="col1">
      <!-- Column 1 start -->

<div id="title">
        <span class="fn">testing.MockClassRecord</span>
        <span>Extends</span>
        <span class="fn-name">
          <a href="http://www.google.com/url?sa=D&q=https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Object">
            Object</a>
        </span>
</div>

<div class="g-section g-tpl-75-25">
  <div class="g-unit g-first" id="description">
    A record that represents all the data associated with a mock replacement of
a given class.
  </div>


        <div class="g-unit" id="useful-links">
          <div class="title">Useful links</div>
          <ol>
            <li><a href="closure_goog_testing_mockclassfactory.js.source.html"><span class='source-code-link'>Source Code</span></a></li>
          </ol>
        </div>
</div>






<h2 class="g-first">Inheritance</h2>
<pre class="inheritance">
Object
     <img src="static/images/inherit.gif">goog.testing.MockClassRecord
</pre>




  <h2>Constructor</h2>
      <div class="fn-constructor">
    goog.testing.MockClassRecord(<span><span class="arg">namespace</span>,&nbsp;<span class="arg">className</span>,&nbsp;<span class="arg">originalClass</span>,&nbsp;<span class="arg">proxy</span></span>)
  </div>

   <h3>Parameters</h3>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">namespace</span>
        : <div class="fullType"><span class="type"><a href="http://www.google.com/url?sa=D&q=https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Object">Object</a></span></div>
        <div class="entryOverview">The namespace in which the mocked class resides.</div>
     </td>
   </tr>
     
   <tr class="odd">
     <td>
        <span class="entryName">className</span>
        : <div class="fullType"><span class="type"><a href="http://www.google.com/url?sa=D&q=https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String">string</a></span></div>
        <div class="entryOverview">The name of the class within the namespace.</div>
     </td>
   </tr>
     
   <tr class="even">
     <td>
        <span class="entryName">originalClass</span>
        : <div class="fullType"><span class="type"><a href="http://www.google.com/url?sa=D&q=https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Function">Function</a></span></div>
        <div class="entryOverview">The original class implementation before it was replaced by a proxy.</div>
     </td>
   </tr>
     
   <tr class="odd">
     <td>
        <span class="entryName">proxy</span>
        : <div class="fullType"><span class="type"><a href="http://www.google.com/url?sa=D&q=https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Function">Function</a></span></div>
        <div class="entryOverview">The proxy that replaced the original class.</div>
     </td>
   </tr>
  </table>


<h2>Instance Methods</h2>


  <div class="legend">
        <span class="key publickey"></span><span>Public</span>
        <span class="key protectedkey"></span><span>Protected</span>
        <span class="key privatekey"></span><span>Private</span>
  </div>







<div>
       <div class="desc">
         Defined in
         <span class="fn-name">
            <a href="class_goog_testing_MockClassRecord.html">
              goog.testing.MockClassRecord
            </a>
         </span>
       </div>






<div class="section">
  <table class="horiz-rule">


     <tr class="even entry public">
       <td class="access"></td>






  <td>
    <a name="goog.testing.MockClassRecord.prototype.addMockInstance"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">addMockInstance<span class="args">(<span class="arg">args</span>,&nbsp;<span class="arg">mock</span>)</span>
        </span>
      </div>


     <div class="entryOverview">
       Adds a new mock instance mapping.  The mapping connects a set of function
arguments to a specific mock instance.
     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">args</span>
        : <div class="fullType"><span class="type"><a href="http://www.google.com/url?sa=D&q=https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Array">Array</a></span></div>
        <div class="entryOverview">An array of function arguments.</div>
     </td>
   </tr>
     
   <tr class="odd">
     <td>
        <span class="entryName">mock</span>
        : <div class="fullType"><span class="type"><a href="class_goog_testing_StrictMock.html">goog.testing.StrictMock</a></span><span>&nbsp;|&nbsp;</span><span class="type"><a href="class_goog_testing_LooseMock.html">goog.testing.LooseMock</a></span></div>
        <div class="entryOverview">A mock associated with the supplied arguments.</div>
     </td>
   </tr>
  </table>
      </div>
   
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="closure_goog_testing_mockclassfactory.js.source.html#line171">code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry public">
       <td class="access"></td>






  <td>
    <a name="goog.testing.MockClassRecord.prototype.findMockInstance"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">findMockInstance<span class="args">(<span class="arg">args</span>)</span>
        </span>
        &#8658; <div class="fullType"><span class="type"><a href="class_goog_testing_StrictMock.html">goog.testing.StrictMock</a></span><span>&nbsp;|&nbsp;</span><span class="type"><a href="class_goog_testing_LooseMock.html">goog.testing.LooseMock</a></span><span>&nbsp;|&nbsp;</span><span class="type">null</span></div>
      </div>


     <div class="entryOverview">
       Finds the mock corresponding to a given argument set.  Throws an error if
there is no appropriate match found.
     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">args</span>
        : <div class="fullType"><span class="type"><a href="http://www.google.com/url?sa=D&q=https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Array">Array</a></span></div>
        <div class="entryOverview">An array of function arguments.</div>
     </td>
   </tr>
  </table>
      </div>
   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<div class="fullType"><span class="type"><a href="class_goog_testing_StrictMock.html">goog.testing.StrictMock</a></span><span>&nbsp;|&nbsp;</span><span class="type"><a href="class_goog_testing_LooseMock.html">goog.testing.LooseMock</a></span><span>&nbsp;|&nbsp;</span><span class="type">null</span></div>&nbsp;
            The mock corresponding to a given argument set.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="closure_goog_testing_mockclassfactory.js.source.html#line183">code &raquo;</a>
  </td>
     </tr>


     <tr class="even entry public">
       <td class="access"></td>






  <td>
    <a name="goog.testing.MockClassRecord.prototype.getClassName"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">getClassName<span class="args">()</span>
        </span>
        &#8658; <div class="fullType"><span class="type"><a href="http://www.google.com/url?sa=D&q=https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String">string</a></span></div>
      </div>


     <div class="entryOverview">
       A getter for this record&#39;s class name.
     </div>


    <! -- Method details -->
    <div class="entryDetails">

   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<div class="fullType"><span class="type"><a href="http://www.google.com/url?sa=D&q=https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String">string</a></span></div>&nbsp;
            The name of the class referenced by this record.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="closure_goog_testing_mockclassfactory.js.source.html#line121">code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry public">
       <td class="access"></td>






  <td>
    <a name="goog.testing.MockClassRecord.prototype.getNamespace"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">getNamespace<span class="args">()</span>
        </span>
        &#8658; <div class="fullType"><span class="type"><a href="http://www.google.com/url?sa=D&q=https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Object">Object</a></span></div>
      </div>


     <div class="entryOverview">
       A getter for this record&#39;s namespace.
     </div>


    <! -- Method details -->
    <div class="entryDetails">

   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<div class="fullType"><span class="type"><a href="http://www.google.com/url?sa=D&q=https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Object">Object</a></span></div>&nbsp;
            The namespace.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="closure_goog_testing_mockclassfactory.js.source.html#line112">code &raquo;</a>
  </td>
     </tr>


     <tr class="even entry public">
       <td class="access"></td>






  <td>
    <a name="goog.testing.MockClassRecord.prototype.getOriginalClass"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">getOriginalClass<span class="args">()</span>
        </span>
        &#8658; <div class="fullType"><span class="type"><a href="http://www.google.com/url?sa=D&q=https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Function">Function</a></span></div>
      </div>


     <div class="entryOverview">
       A getter for the original class.
     </div>


    <! -- Method details -->
    <div class="entryDetails">

   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<div class="fullType"><span class="type"><a href="http://www.google.com/url?sa=D&q=https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Function">Function</a></span></div>&nbsp;
            The original class implementation before mocking.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="closure_goog_testing_mockclassfactory.js.source.html#line130">code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry public">
       <td class="access"></td>






  <td>
    <a name="goog.testing.MockClassRecord.prototype.getProxy"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">getProxy<span class="args">()</span>
        </span>
        &#8658; <div class="fullType"><span class="type"><a href="http://www.google.com/url?sa=D&q=https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Function">Function</a></span></div>
      </div>


     <div class="entryOverview">
       A getter for the proxy being used as a replacement for the original class.
     </div>


    <! -- Method details -->
    <div class="entryDetails">

   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<div class="fullType"><span class="type"><a href="http://www.google.com/url?sa=D&q=https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Function">Function</a></span></div>&nbsp;
            The proxy.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="closure_goog_testing_mockclassfactory.js.source.html#line139">code &raquo;</a>
  </td>
     </tr>


     <tr class="even entry public">
       <td class="access"></td>






  <td>
    <a name="goog.testing.MockClassRecord.prototype.getStaticMock"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">getStaticMock<span class="args">()</span>
        </span>
        &#8658; <div class="fullType"><span class="type"><a href="class_goog_testing_StrictMock.html">goog.testing.StrictMock</a></span><span>&nbsp;|&nbsp;</span><span class="type"><a href="class_goog_testing_LooseMock.html">goog.testing.LooseMock</a></span><span>&nbsp;|&nbsp;</span><span class="type">null</span></div>
      </div>


     <div class="entryOverview">
       A getter for the static mock.
     </div>


    <! -- Method details -->
    <div class="entryDetails">

   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<div class="fullType"><span class="type"><a href="class_goog_testing_StrictMock.html">goog.testing.StrictMock</a></span><span>&nbsp;|&nbsp;</span><span class="type"><a href="class_goog_testing_LooseMock.html">goog.testing.LooseMock</a></span><span>&nbsp;|&nbsp;</span><span class="type">null</span></div>&nbsp;
            The static mock associated with this record.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="closure_goog_testing_mockclassfactory.js.source.html#line149">code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry public">
       <td class="access"></td>






  <td>
    <a name="goog.testing.MockClassRecord.prototype.reset"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">reset<span class="args">()</span>
        </span>
      </div>


     <div class="entryOverview">
       <span class='nodesc'>No description.</span>
     </div>

   
  </td>


  <td class="view-code">
     <a href="closure_goog_testing_mockclassfactory.js.source.html#line199">code &raquo;</a>
  </td>
     </tr>


     <tr class="even entry public">
       <td class="access"></td>






  <td>
    <a name="goog.testing.MockClassRecord.prototype.setStaticMock"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">setStaticMock<span class="args">(<span class="arg">staticMock</span>)</span>
        </span>
      </div>


     <div class="entryOverview">
       A setter for the static mock.
     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">staticMock</span>
        : <div class="fullType"><span class="type"><a href="class_goog_testing_StrictMock.html">goog.testing.StrictMock</a></span><span>&nbsp;|&nbsp;</span><span class="type"><a href="class_goog_testing_LooseMock.html">goog.testing.LooseMock</a></span></div>
        <div class="entryOverview">A mock to associate with the static functions for the referenced class.</div>
     </td>
   </tr>
  </table>
      </div>
   
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="closure_goog_testing_mockclassfactory.js.source.html#line159">code &raquo;</a>
  </td>
     </tr>


  </table>
</div>
</div>




<h2>Instance Properties</h2>







<div>
       <div class="desc">
         Defined in
         <span class="fn-name">
            <a href="class_goog_testing_MockClassRecord.html">
              goog.testing.MockClassRecord
            </a>
         </span>
       </div>






<div class="section">
  <table class="horiz-rule">


     <tr class="even entry private">
       <td class="access"></td>





  <a name="goog.testing.MockClassRecord.prototype.staticMock_"></a>

  <td>


     <div class="arg">
        <img align="left" src="static/images/blank.gif">

        <span class="entryName">staticMock_</span>
        : <div class="fullType"><span class="type"><a href="class_goog_testing_StrictMock.html">goog.testing.StrictMock</a></span><span>&nbsp;|&nbsp;</span><span class="type"><a href="class_goog_testing_LooseMock.html">goog.testing.LooseMock</a></span><span>&nbsp;|&nbsp;</span><span class="type">null</span></div>
     </div>


     <div class="entryOverview">
       A mock associated with the static functions for a given class.
     </div>

  </td>


  <td class="view-code">
     <a href="closure_goog_testing_mockclassfactory.js.source.html#line105">Code &raquo;</a>
  </td>
     </tr>


  </table>
</div>
</div>










<div class="section">
  <table class="horiz-rule">


  </table>
</div>









<div class="section">
  <table class="horiz-rule">


  </table>
</div>
      <!-- Column 1 end -->
    </div>

        <div class="col2">
          <!-- Column 2 start -->
          <div class="col2-c">
            <h2 id="ref-head">Package testing</h2>
            <div id="localView"></div>
          </div>

          <div class="col2-c">
            <h2 id="ref-head">Package Reference</h2>
            <div id="sideTypeIndex" rootPath="goog" current="testing.MockClassRecord"></div>
          </div>
          <!-- Column 2 end -->
        </div>
</div>
</div>

</body>
</html>
